import 'package:flutter/material.dart';


extension WidgetExt on Widget {

  //添加padding
  Widget padding(EdgeInsetsGeometry padding) {
    return Padding(
      child: this,
      padding: padding,
    );
  }

  //添加padding
  Widget margin(EdgeInsetsGeometry padding) {
    return Container(
      child: this,
      margin: padding,
    );
  }

  //添加手势
  Widget gesture({
    GestureTapCallback? onTap, //点击
    GestureTapCallback? onDoubleTap, //双击
    GestureLongPressCallback? onLongPress, //长按
  }) {
    return InkWell(
      child: this,
      onTap: onTap,
      onDoubleTap: onDoubleTap,
      onLongPress: onLongPress,
    );
  }



}